/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * <h2><center>&copy; Copyright (c) 2021 STMicroelectronics.
  * All rights reserved.</center></h2>
  *
  * This software component is licensed by ST under Ultimate Liberty license
  * SLA0044, the "License"; You may not use this file except in compliance with
  * the License. You may obtain a copy of the License at:
  *                             www.st.com/SLA0044
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define Motor_1_PWMcounter 1999
#define Motor_2_PWMcounter 1999
#define Motor_ABcoder_counter 500*30*4-1
#define Motor_1A_Pin GPIO_PIN_5
#define Motor_1A_GPIO_Port GPIOE
#define Motor_1B_Pin GPIO_PIN_6
#define Motor_1B_GPIO_Port GPIOE
#define GPO_Emit_Pin GPIO_PIN_2
#define GPO_Emit_GPIO_Port GPIOA
#define GPO_Cap_Pin GPIO_PIN_3
#define GPO_Cap_GPIO_Port GPIOA
#define GPO_Power_Pin GPIO_PIN_5
#define GPO_Power_GPIO_Port GPIOA
#define LED_1_Pin GPIO_PIN_2
#define LED_1_GPIO_Port GPIOB
#define LED_SYS_Pin GPIO_PIN_7
#define LED_SYS_GPIO_Port GPIOE
#define Motor_2A_Pin GPIO_PIN_9
#define Motor_2A_GPIO_Port GPIOE
#define Motor_2B_Pin GPIO_PIN_11
#define Motor_2B_GPIO_Port GPIOE
#define IMU_UART3_TX_Pin GPIO_PIN_8
#define IMU_UART3_TX_GPIO_Port GPIOD
#define IMU_UART3_RX_Pin GPIO_PIN_9
#define IMU_UART3_RX_GPIO_Port GPIOD
#define coder_3A_Pin GPIO_PIN_12
#define coder_3A_GPIO_Port GPIOD
#define coder_3B_Pin GPIO_PIN_13
#define coder_3B_GPIO_Port GPIOD
#define coder_4A_Pin GPIO_PIN_6
#define coder_4A_GPIO_Port GPIOC
#define coder_4B_Pin GPIO_PIN_7
#define coder_4B_GPIO_Port GPIOC
#define HOST_USART1_TX_Pin GPIO_PIN_9
#define HOST_USART1_TX_GPIO_Port GPIOA
#define HOST_USART1_RX_Pin GPIO_PIN_10
#define HOST_USART1_RX_GPIO_Port GPIOA
#define FINSH_UART2_TX_Pin GPIO_PIN_5
#define FINSH_UART2_TX_GPIO_Port GPIOD
#define FINSH_UART2_RX_Pin GPIO_PIN_6
#define FINSH_UART2_RX_GPIO_Port GPIOD
#define PWM_3_Laser_Pin GPIO_PIN_3
#define PWM_3_Laser_GPIO_Port GPIOB
#define PWM_2_Pin GPIO_PIN_8
#define PWM_2_GPIO_Port GPIOB
#define PWM_1_Pin GPIO_PIN_9
#define PWM_1_GPIO_Port GPIOB
/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
